package perf.data;

import java.util.ArrayList;
import java.util.List;

public class Data {

	private List<Setup> setups = new ArrayList<Setup>();
	
	public List<Setup> getSetups( ) {
		return setups;
	}
	
	public Setup getSetupInstance( String name ) {
		for ( Setup s : setups ) {
			if ( s.getName().equals( name ) ) {
				return s;
			}
		}
		
		return addSetup( new Setup( name ) );
	}
	
	protected Setup addSetup( Setup setup ) {
		setups.add( setup );
		return setup;
	}	
}
